package demo1;

import java.util.Scanner;

public class Test {
    public static void main(String[] args) {
        Scanner scanner=new Scanner(System.in);
        int n=scanner.nextInt();
        if(n==1||n==2){
            System.out.println(1);
            return;
        }
        int sum = 0;
        int a=1;
        int b=1;
        for (int i = 3; i <=n; i++) {
            sum = a+b;
            a=b;
            b=sum;
        }
        System.out.println(sum);
    }
}
